﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharedLib.MessageFramework;
using SharedLib.MessageFramework.Messages;

namespace TracyGUI.Controller.EntryTabs
{
    class AllEntriesTabPageViewController : EntryTabPageViewControllerBase
    {
        public AllEntriesTabPageViewController() : base("All Entries", Tracy.TracyFacade.Instance.LanguageManager.GetText("EntryTabAllEntriesLoading"))
        {
            AsyncActionAppMessage msg = new AsyncActionAppMessage(this, aaamsg =>
            {
                View.Text = Tracy.TracyFacade.Instance.LanguageManager.GetText("EntryTabAllEntries");
                FileTabPage.LoadMediaFiles(Tracy.TracyFacade.Instance.MediaFileProvider.GetItems());
                ResTabPage.LoadResources(Tracy.TracyFacade.Instance.ResourceProvider.GetItems());
            }, "AsyncActionAppMessage_ShowAllEntries");
            msg.Priority = MessagePriority.High;
            Tracy.TracyFacade.Instance.MessageDispatcher.EnqueueMessage(msg);
        }
    }
}
